package com.cloudbench.common;

import java.util.concurrent.Executor;

import android.os.AsyncTask;

/**
 * 
 * @Author : Daniel Han(@daniel_booknara)
 * @Date : June 7, 2013
 * @Version : 1.0.0
 */
public class Constants {
	public static final Executor EXECUTOR = AsyncTask.THREAD_POOL_EXECUTOR;

	public static final boolean DEBUG = true;
	
	// Program Name
	public static final String NAME = "CloudBench";
	
	public static final String PACKAGE_NAME = "com.cloudbench";
	public static final String PREFERENCES_NAME = PACKAGE_NAME;
	public static final String LOG_TAG = NAME;
	
	
	// ********************************** /
	public static final int CONNECTION_TIMEOUT = 30 * 1000; // 30 seconds
	public static final int SOCKET_TIMEOUT = 5 * 60 * 1000;  // 5 minute
	// ********************************** /
	// Thumbnail Cache Size
	public final static int MAX_MEMORY = (int) (Runtime.getRuntime().maxMemory() / 1024);
	public final static int APP_IMAGE_CACHE_SIZE = MAX_MEMORY / 16;
	public final static int USER_PROFILE_CACHE_SIZE = MAX_MEMORY / 16;
	
	
	// Time Constant
	public static final int TIME_10_SECOND = 10 * 1000;
	public static final int TIME_20_SECOND = 20 * 1000;
	public static final int TIME_30_SECOND = 30 * 1000;
	public static final int TIME_01_MINUTE = 60 * 1000;
	public static final int TIME_05_MINUTE = 5 * TIME_01_MINUTE;
	public static final int TIME_10_MINUTE = 10 * TIME_01_MINUTE;
	public static final int TIME_30_MINUTE = 30 * TIME_01_MINUTE;
	public static final int TIME_01_HOUR = 60 * TIME_01_MINUTE;
	public static final int TIME_12_HOUR = 12 * TIME_01_HOUR;
	public static final int TIME_24_HOUR = 24 * TIME_01_HOUR;
	public static final int TIME_2_DAY = 2 * TIME_24_HOUR;
	
	// APP SERVER URL 
	private static final String GOOGLE_APP_SERVER_URL ="http://windmsb.appspot.com/sign";
	//private static final String LOCAL_APP_SERVER_URL ="http://10.0.2.2:8888/guestbook";
	private static final String LOCAL_APP_SERVER_URL ="http://10.0.2.2:8888/sign";
	private static final String LOCAL_APP_SERVER_URL2 ="http://127.0.0.1:8888";
	
	// auth url
	public static String appServerUrl() {
		if(DEBUG == true)
			return LOCAL_APP_SERVER_URL;
			//return LOCAL_APP_SERVER_URL2;
		
		
		return GOOGLE_APP_SERVER_URL;
	}

}